const creepEvent = {
    pushCreepToWork: function (params) {
        const { creepName, targetID } = params
        let targetObj = Game.getObjectById(targetID)
        let targetMemory = targetObj.room.memory['structure'][targetObj.structureType][targetID]
        if (targetMemory.creeps.indexOf(creepName) == -1) targetMemory.creeps.push(creepName)
    },
    creepToSleep: function (params) {
        const { creepName, to = false } = params
        if (!Game.creeps[creepName])return
        Memory.creeps[creepName]['state']['sleep'] = to
    },
    changHarvesterCheckContainer: function (params) {
        const { creepName, to = false } = params
        if (!Game.creeps[creepName])return
        Memory.creeps[creepName]['params']['checkContainer'] = to
    },
}

export default creepEvent